home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 21
/
Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso
/
Aminet
/
comm
/
mail
/
YamToolDK.lha
/
yamtools20danish
/
arexxqsort.lha
/
arexxqsort
/
QsortTest.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1990-10-01
|
788b
|
34 lines
/** QsortTest.rexx
*
* This is a test of QSORT
*
**/
arg names
if names = "" then names = "*"
/*
* FileList is a rexxarplib function.
* It returns a stem variable who's elements (files.1, files.2 ...)
* contain file names. files.0 contains the number of files found.
*/
result = FileList(names, files, , E)
say "List of files:"
do i = 1 to files.0; say files.i; end
/*
* QSORT is the QuickSort function
*
* Calling sequence:
*
* QSORT(first, last, array)
* first = number of first element to be sorted
* last = number of last element to be sorted
* array = stem variable array who's elements need to be sorted.
*
*/
call QSORT(1, files.0, files)
/*
* Print the result
*/
say ""
say "Same list, but sorted"
do i = 1 to files.0; say files.i; end